import request from '@/utils/request'

export function login(mobile, password) {
  return request({
    url: `/login/sorterLogin`,
    method: 'post',
    data: {
      mobile: mobile,
      pwd: password
    }
  })
}

export function getCategory() {
  return request({
    url: `/sorter/getCategory`,
    method: 'post',
    data: null
  })
}

export function getOrderDetail(id) {
  return request({
    url: `/sorter/index`,
    method: 'post',
    data: {
      id
    }
  })
}

export function submit(id, type, number) {
  return request({
    url: `/sorter/submit`,
    method: 'post',
    data: {
      id,
      type,
      number
    }
  })
}

export function getOrderInfo(id) {
  return request({
    url: `/sorter/shouye`,
    method: 'post',
    data: {
      id
    }
  })
}

export function getPrice(id) {
  return request({
    url: `/sorter/getPrice`,
    method: 'post',
    data: null
  })
}

